<template>
  <div style="width: 100%;height: 100%;">
    <table cellpadding="0" cellspacing="0" style="width: 100%;height: 100%">
      <tr v-for="item in sizes" :key="'scaleY'+item">
        <td :class="item === 1 ? 'bothBorder':'bottomBorder'">
          <div style="width: 50%;height: 100%;float: left; position: relative;">
            <div class="ruler-value">{{Math.round(item * step)}}</div>
          </div>
          <div style="width: 50%;height: 100%;float: right;">
            <table cellpadding="0" cellspacing="0" style="width: 100%;height: 100%">
              <tr v-for="item in 4" :key="item">
                <td class="bottomBorder"></td>
              </tr>
              <tr>
                <td style="border-bottom: 1px solid transparent"></td>
              </tr>
            </table>
          </div>
        </td>
      </tr>
    </table>
  </div>
</template>

<script>
export default {
  name: "ScaleMarkY",
  props: {
    max: {
      type: Number,
      default: 1080
    }
  },
  data() {
    return {
      sizes: 12
    }
  },
  computed: {
    step() {
      return this.max / this.sizes
    }
  }
}
</script>

<style scoped>
.bothBorder{border-bottom: 1px solid #6e7ea6;border-top: 1px solid #6e7ea6;}
.bottomBorder{border-bottom: 1px solid #6e7ea6;}
.ruler-value {
  position: absolute;
  color: rgb(221, 221, 221);
  left: -10px;
  bottom: 0px;
  font-size: 13px;
  writing-mode: tb-rl;
  transform: scale(0.6);
}
</style>
